package org.tigris.atlas.examples.service.impl;

import java.util.Collection;

import org.tigris.atlas.examples.bizobj.EnumerationExampleAssembler;
import org.tigris.atlas.examples.bizobj.EnumerationExampleBO;
import org.tigris.atlas.examples.enumeration.DayOfWeekEnumeration;
import org.tigris.atlas.examples.enumeration.PrimaryColorValueEnumeration;
import org.tigris.atlas.examples.service.EnumerationExampleCollectionServiceResponse;


/**
 * Service implementation class for the EnumerationExample service
 * @see org.tigris.atlas.examples.service.EnumerationExampleService
 */
public class EnumerationExampleServiceImpl extends EnumerationExampleServiceBaseImpl {

	/**
	 * Execute the SelectByDayAndColor service
	 * @see org.tigris.atlas.examples.service.EnumerationExampleService#SelectByDayAndColor()
	 */
	protected void selectByDayAndColorImpl(DayOfWeekEnumeration day, PrimaryColorValueEnumeration color, EnumerationExampleCollectionServiceResponse response) {
		Collection bos = EnumerationExampleBO.selectByDayAndColor(day, color);
		Collection tos = EnumerationExampleAssembler.getEnumerationExampleCollection(bos);
		response.addEnumerationExamples(tos);
	}


	/**
	 * Execute the SelectByDay service
	 * @see org.tigris.atlas.examples.service.EnumerationExampleService#SelectByDay()
	 */
	protected void selectByDayImpl(DayOfWeekEnumeration day, EnumerationExampleCollectionServiceResponse response) {		
		Collection bos = EnumerationExampleBO.selectByDay(day);
		Collection tos = EnumerationExampleAssembler.getEnumerationExampleCollection(bos);
		response.addEnumerationExamples(tos);
	}


	/**
	 * Execute the SelectByColor service
	 * @see org.tigris.atlas.examples.service.EnumerationExampleService#SelectByColor()
	 */
	protected void selectByColorImpl(PrimaryColorValueEnumeration color, EnumerationExampleCollectionServiceResponse response) {
		Collection bos = EnumerationExampleBO.selectByColor(color);
		Collection tos = EnumerationExampleAssembler.getEnumerationExampleCollection(bos);
		response.addEnumerationExamples(tos);
	}

}